package com.java2_28;

public class MyEnumerate {
    private final String name;
    private final String color;

    private MyEnumerate(String name, String color) {
        this.name = name;
        this.color = color;
    }

    public static final MyEnumerate REDBIRD = new MyEnumerate("xiaohong", "red");
    public static final MyEnumerate YELLOWBIRD = new MyEnumerate("xiaohuang", "yellow");
    public static final MyEnumerate BLUEBIRD = new MyEnumerate("xiaolan", "blue");

    public String getName() {
        return name;
    }


    public String getColor() {
        return color;
    }


    public MyEnumerate getREDBIRD() {
        return REDBIRD;
    }


    public MyEnumerate getYELLOWBIRD() {
        return YELLOWBIRD;
    }


    public MyEnumerate getBLUEBIRD() {
        return BLUEBIRD;
    }

    @Override
    public String toString() {
        return "MyEnumerate{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                '}';
    }
}
